package Thread.ThreadLocal;

import javax.xml.crypto.Data;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName interview
 * @Description: TODO
 * @date ${DAT}18:43
 */
public class ThreadLocalUsage01 {
    public String date(int seconds){
        Date date = new Date(1000* seconds);
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return dateFormat.format(date);
    }

    public static void main(String[] args) {
        new Thread(() -> {
            String date = new ThreadLocalUsage01().date(10);
            System.out.println(date);
        }).start();

        new Thread(() -> {
            String date = new ThreadLocalUsage01().date(1000);
            System.out.println(date);
        }).start();
    }
}
